class Music < ActiveRecord::Base
      belongs_to :content
     has_attachment  :storage => :file_system, 
                  :min_size => 0.kilobytes,
                  :max_size => 10.megabytes,
                  :path_prefix => 'public/upload/' 
     validates_as_attachment
     
     
         def  full_filename(thumbnail = nil)      
                file_system_path = (thumbnail ? thumbnail_class : self).attachment_options[:path_prefix]      
                 File.join(RAILS_ROOT, file_system_path, 'music', thumbnail_name_for(thumbnail))      
         end  
end
